package com.xiaofei.Tools;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler{
    @ExceptionHandler//指定处理什么异常
    public Result doException(Exception e){
        return Result.error("出错了，请找管理员" );
    }
}